<template>
    <el-dialog 
        :title="$t('m.agreementSpecification')" 
        custom-class="popup_dialog"
        :append-to-body="true"
        :visible.sync="show"
        @close="close"
        width="600px"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
    >
       <ul class="lists">
           <li v-for="(item,index) in Data" :key="index" @click="ShowInfos(item)">
               《{{item['name_'+lang]}}》
           </li>
       </ul>
    </el-dialog>
</template>
<script>
    export default {
        components: {},
        props: ["show",'Data'],
        data() {
            return{

            }
        },
        computed:{
            lang(){
                return sessionStorage.getItem("lang")=='zh-CN'?'zh':sessionStorage.getItem("lang")=='zh-TW'?'tc':'en';
            }
        },
        mounted(){
            console.log(this.Data)
        },
        methods:{
            // 关闭交易弹窗
            close() {
                this.$emit("closeClick",'isStatementinfo');
            },
            ShowInfos(item){
                if(item.is_pdf == 2){
                    window.open(item['pdf_url_'+this.lang])
                }else{
                    this.$emit("openClick",'isStatement',item.id);
                }
            }
        },
        watch:{

        },
    }
</script>
<style lang="less">
    .popup_dialog{
        .content{
            height:500px;
            overflow: auto;
            p{
                font-size: 12px;
                color: @b0b0b2;
            }
            
        }
        li{
            font-size: 16px;
            color: @b0b0b2;
            line-height:28px;
            cursor: pointer;
        }
        li:hover{
            color: @hoverColor;
        }
    }
</style>